<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>京东的某个商品的价格信息</title>
		<script type="text/javascript" src="js/jquery.min.js"></script>
	</head>
	<body>
		<div>
			商品价格:<span id="price"></span>
		</div>
		<div>
			商品编号:<span id="id"></span>
		</div>
	</body>
	<script type="text/javascript">
		//1.实现写死的json字符串,解析展现到页面上
		var jsonstr='{"p":"17999.00","op":"17999.00","cbf":"0","id":"J_100010378153","m":"100000.00"}';
		var obj=JSON.parse(jsonstr);
		var price=obj.p;
		var id=obj.id;
		console.log(price);
		console.log(id);
		
		$("#price").text(price);
		$("#price").css("color","blue");
		$("#id").text(id);
		$("#id").css("color","red");
	</script>
</html>
